#ifndef COMPONENT_H
#define COMPONENT_H

#include "eleman.h"
#include <math.h>
#include "comprowidget.h"
#include "node.h"

class Node;
class comProWidget;
class component : public Eleman
{
    public:
        component(int x,int y,int pid,std::string ptip);
        virtual ~component();
        int handle(int handle);
        std::string tipgonder();
        std::string type();
        void status(int pStatus);
        int status();
        void angel(int p);
        Node *saggonder();
        Node *solgonder();
        int id();
        int angel();
        int koordx();
        int koordy();
        std::string item_id();
        void item_id(std::string p);
        void selectable(bool pSelectable);
        bool selectable();
        void movable(bool pMovable);
        bool movable();
        void fromLink1(bool pFromLink);
        void fromLink2(bool pFromLink);
        bool fromLink1();
        bool fromLink2();
        void toLink1(bool pToLink);
        void toLink2(bool pToLink);
        bool toLink1();
        bool toLink2();
        void deletable(bool pDeletable);
        bool deletable();
        void value(int pValue);
        int value();
        comProWidget *Nitelik();
        void resimbelirle(std::string path);
        void component::nodesCalc(int mAngel);
        bool deletesil();
        Fl_Box *ustbilgi;
    protected:
        void draw();
    private:
        comProWidget *nitwid;
        Fl_PNG_Image *resim;
        Node *sag;
        Node *sol;
        int cid;
        std::string cTip;
        std::string cItem_id;
        int cx;
        int cy;
        int yy;
        int xx;
        int nx,ny;
        int cAngel;
        int cStatus;
        int cValue;
        bool cSelectable;
        bool cDeletable;
        bool cMovable;
        bool cFromLink1;
        bool cFromLink2;
        bool cToLink1;
        bool cToLink2;
        int aci;
        bool sildelete;

};

#endif // COMPONENT_H
